package xyz.pro5books.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xyz.pro5books.pojo.Rights;
import xyz.pro5books.service.RightsService;
import xyz.pro5books.vo.SysResult;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/rights")
public class RightsController {

    @Autowired
    private RightsService rightsService;


    @GetMapping("/getRightsList")
    public SysResult getRightsList(){
         List<Rights> rightsList = rightsService.getRightsList();
        return SysResult.success(rightsList);
    }





}
